import 'package:fenzi/pages/index.dart';
import 'package:flutter/material.dart';
import 'package:fenzi/global.dart';
import 'package:fenzi/manager/main_manager.dart';
import 'package:provider/provider.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  Provider.debugCheckInvalidValueType = null;
  runApp(
    MultiProvider(
      child: MyApp(),
      providers: [
        ChangeNotifierProvider.value(value: MainManager()..init()),
      ],
    ),
  );
}

class MyApp extends StatelessWidget {
  MyApp({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "随份子-往来账簿",
      theme: ThemeData(
        brightness: Brightness.light,
        primaryColor: Global.primaryColor,
      ),
      home: Scaffold(
        body: IndexPage(),
      ),
    );
  }
}
